package pl.edu.mimuw.mas.visualization;

import pl.edu.mimuw.mas.agent.AgentPossition;
import pl.edu.mimuw.mas.chart.Chart;
import pl.edu.mimuw.mas.visualization.agent.AgentPossitionManager;
import pl.edu.mimuw.mas.visualization.rendering.ChartRendererContext.contextType;

/**
 * Wizualizacja agentów (nie edytor) podstawowe rozszerzenie funkcjonalności. 
 */
public class AgentBaseVisualization extends AbstractVisualization {

	private AgentPossitionManager possitionManager;

	public AgentBaseVisualization(Chart chart) {
		super(chart);
		
		possitionManager = new AgentPossitionManager();
		possitionManager.start();
		renderer.setPossitionManager(possitionManager);
	}

	protected contextType getType() {
		return contextType.VISUALIZATION;
	}

	public void registerAgentPossition(AgentPossition ap) {
		possitionManager.registerAgentPossition(ap);
	}

	public void deregisterAgentPossition(AgentPossition ap) {
		possitionManager.deregisterAgentPossition(ap);
	}
}
